package com.gzhu.knowledgeAdmin.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gzhu.knowledgeAdmin.common.vo.KnowledgeDetailVo;
import com.gzhu.knowledgeAdmin.common.vo.KnowledgeFailDetailVo;
import com.gzhu.knowledgeAdmin.common.vo.KnowledgeQAVo;
import com.gzhu.knowledgeAdmin.common.vo.KnowledgeVo;
import com.gzhu.knowledgeAdmin.entity.Zs;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 知识表
 * 
 * @author giaogiao
 * @email giaogiao@gmail.com
 * @date 2023-04-22 23:18:59
 */
@Mapper
public interface ZsDao extends BaseMapper<Zs> {

    KnowledgeDetailVo selectDetailById(@Param("id") Integer id);

    List<KnowledgeQAVo> selectQAList(@Param("gsId") String gsId);

    Page<KnowledgeVo> page(@Param("page") Page<KnowledgeVo> page, @Param("ew") QueryWrapper<KnowledgeVo> wrapper);

    List<Zs> selectCurrentData(@Param("fromIndex") int fromIndex, @Param("pageSize") Integer pageSize);
}
